package cn.lili.modules.promotion.entity.dos;

import cn.lili.mybatis.model.BaseStandardEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("li_ticket_order")
@ApiModel(value = "门票订单表")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TicketOrder extends BaseStandardEntity {
    @ApiModelProperty(name = "订单号")
    private String orderNo;

    @ApiModelProperty(name = "用户ID")
    private String userId;

    @ApiModelProperty(name = "用户名称")
    private String userName;

    @ApiModelProperty(name = "下单时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date placeTime;

    @ApiModelProperty(name = "兑换方式：普通方式、套餐方式")
    private String exchangeType;

    @ApiModelProperty(name = "关联订单号")
    private String transactionSn;

    @ApiModelProperty(name = "关联门票表ID")
    private String ticketId;

    @ApiModelProperty(name = "关联门票表票号")
    private String ticket;

    @ApiModelProperty(name = "座位号")
    private String seat;

    @ApiModelProperty(name = "订单状态：同普通订单状态")
    private String orderStatus;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    @TableField(exist = false)
    private Date startTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    @TableField(exist = false)
    private Date endTime;
}
